package com.iscc.fake.service.Impl;

import com.iscc.fake.dao.Impl.ProductDAOImpl;
import com.iscc.fake.dao.Impl.UserDaoImpl;
import com.iscc.fake.dao.ProductDAO;
import com.iscc.fake.dao.UserDAO;
import com.iscc.fake.domain.Product;
import com.iscc.fake.service.ProductService;

import java.util.List;
import java.util.Map;

public class ProductServiceImpl implements ProductService {
    private ProductDAO productDAO = new ProductDAOImpl();
    @Override
    public int addProduct(Product product) {
        return productDAO.add(product);
    }
    @Override
    public List<Map<String, Object>> queryAllProduct(String name) {
        return productDAO.queryAllProduct(name);
    }

    @Override
    public Product queryByid(int id) {
        return productDAO.queryByid(id);
    }
    @Override
    public List<Map<String, Object>> queryDetail(String name) {
        return productDAO.querydetail(name);
    }
    @Override
    public List<Map<String, Object>> queryForm(String name) {
        return productDAO.queryform(name);
    }
}
